package com.ouc.controller;

import com.ouc.common.Result;
import com.ouc.service.EmployeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name: EmployeeController
 * @Description:
 * @Author: Mr.Tong
 */
@RestController
@RequestMapping("/emp")
@CrossOrigin
@Api(tags = "员工接口", description = "提供周大框员工的接口信息")
public class EmployeeController {

    @Autowired
    private EmployeeService employeeService;

    @ApiOperation("获得所有的员工信息")
    @GetMapping("/getallemp")
    public Result getAllEmp(){
        return Result.ok().data("allemp",employeeService.getAllEmployee());
    }




}
